+2008-02-10 Matthias Clasen <mclasne@redhat.com>
+
+ * gdk-pixbuf-scaled-anim.c: Try harder to return pixbufs
+ of the requested size. (#494515, Mike Morrison)
+
2008-01-15 Matthias Clasen <mclasne@redhat.com>
* gdk-pixbuf-io.c (save_to_stream): Handle partial writes.
/* Get a new scaled pixbuf */
scaled->current = gdk_pixbuf_scale_simple (pixbuf,
- (int) (gdk_pixbuf_get_width (pixbuf) * scaled->xscale),
- (int) (gdk_pixbuf_get_height (pixbuf) * scaled->yscale),
+ (int) (gdk_pixbuf_get_width (pixbuf) * scaled->xscale + .5),
+ (int) (gdk_pixbuf_get_height (pixbuf) * scaled->yscale + .5),
GDK_INTERP_BILINEAR);
/* Copy the original pixbuf options to the scaled pixbuf */
GDK_PIXBUF_ANIMATION_GET_CLASS (scaled->anim)->get_size (scaled->anim, width, height);
if (width)
- *width = (int)(*width * scaled->xscale);
+ *width = (int)(*width * scaled->xscale + .5);
if (height)
- *height = (int)(*height * scaled->yscale);
+ *height = (int)(*height * scaled->yscale + .5);
}
static GdkPixbufAnimationIter *